Vue.component("ranking",{
    template: `
    <el-card style="height: 100%">
        <div slot="header" class="clearfix flex">
            <span>热片排行</span>
            <el-link href="hots.html" :underline="false">更多影片</el-link>
        </div>
        <el-card class="hsc" v-for="(item, index) in fivemovie"><el-link href="detail.html" :underline="false">{{index + 1}}.{{item.name}}</el-link></el-card>
    </el-card>
    `,
    data(){
        return{
            fivemovie:[]
        }
    },
    methods:{
        //查询最新放映的5部电影信息
        getFiveMovie(){
            axios.get("movie/getFiveMovie").then(res=>{
                this.fivemovie = res.data.data;
                this.still = res.data.data;
            });
        },
    },
    created(){
        this.getFiveMovie();
    }
});